package com.project.springboot.clone;

import cn.hutool.core.clone.Cloneable;

/**
 * description: 我的克隆实体类
 * @author 朱正磊
 * @date 2025-07-30 10:07:43
 */
public class MyCloneEntity implements Cloneable<MyCloneEntity> {

    private Integer id;

    private String name;

    @Override
    public MyCloneEntity clone() {
        try {
            return (MyCloneEntity) super.clone();
        } catch (CloneNotSupportedException e) {
            throw new RuntimeException(e);
        }
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    @Override
    public String toString() {
        return "MyCloneEntity{" +
                "id=" + id +
                ", name='" + name + '\'' +
                '}';
    }

}
